package zry.Achievement;

import lombok.Data;

@Data
public class Achievement {
    private String a_id;
    private String a_type;
    private String s_id;
    private Integer p_review;
    private Integer f_review;

    public Achievement() {
    }

    public Achievement(String achievement_id, String achievement_type, String student_id, Integer preliminary_review, Integer final_review) {
        this.a_id = achievement_id;
        this.a_type = achievement_type;
        this.s_id = student_id;
        this.p_review = preliminary_review;
        this.f_review = final_review;
    }

    @Override
    public String toString() {
        String p = p_review.toString().replaceAll("0", "等待审核").replaceAll("-1", "未通过 ").replaceAll("1", "通过  ");
        String f = f_review.toString().replaceAll("0", "等待审核").replaceAll("-1", "未通过 ").replaceAll("1", "通过  ");
        return a_id + "\t\t\t" + a_type + "\t\t\t" + s_id + "\t\t\t" + p + "\t\t" + f + "\n";
    }
}